package com.hss.rxjava.bean;

import com.hss.rxjava.CheckInterface;
import com.hss.rxjava.StringUtils;

public class MessageType implements CheckInterface {
	private String typeName;
	private int type;
	public String getTypeName() {
		return typeName;
	}
	public void setTypeName(String typeName) {
		this.typeName = typeName;
	}
	public int getType() {
		return type;
	}
	public void setType(int type) {
		this.type = type;
	}

	@Override
	public boolean check(int index) {
		if(!StringUtils.isValidate(typeName))return false;
		return true;
	}

	@Override
	public void fix(int index) {
		typeName = StringUtils.makeStringNotNull(typeName,"消息类型:" + type);
	}
}
